\pard\tx7140\b0\fs28\li2100 INHERITS FROM TextConverter\
\fs16 \
\fs28 DECLARED IN NeXTtoMacText.h\
\fs16 \
\
\
\fs28 CLASS DESCRIPTION\
\fs16 \
\pard\tx3120\tx3620\tx4120\fs28\li2620 The NeXTtoMacText class serves to convert raw text from the standard NeXT character set to the standard Mac character set. It accomplishes this by overriding the methods provided by TextConverter class, and introducing its own conversion algorithms instead. See the TextConverter class document for details about the way one of these classes works.\
\fs16 \
\fs28 This uses the standard NeXTstep encoding vector defined in the version 2 documentation. Most of the conversion is straight forward. Those characters that can not be mapped to a single Macintosh character are either not altered at all, and an error code is set, or a string representing them is substituted in their place. In all cases, there is room for ambiguity when dealing with single quotes. On the NeXT, the single quotes ` amd ' are both in the ASCII set (below 127) and are also proper 'curly' quotes. The Mac has a neuter quote and a grave accent that is also used as an opening quote by some in those positions. Some users would want to convert the NeXT quotes to the Macintosh typograhically pretty quotes, others will want to convert them to the standard ASCII positions. Thus, this allows a flag (UseCurlyQuotes) to be set to YES if the user wishes to map them to the typographically pretty quotes. Otherwise standard ASCII ones are generated.
\pard\tx7140\fs16\li2100 \
\pard\tx3120\tx3620\tx4120\li2620 \
\fs28 A table listing the conversions done by this class is provided at the end.\
\fs16 \
\pard\tx7140\li2100 \
\
\fs28 INSTANCE VARIABLES\
\fs16 \
\pard\tx7140\tx10180\tx10680\i\fs28\fi-4540\li7140 Declared in MacToNeXTText
\pard\tx3120\tx3620\tx4120\b0\fs28\li2620 This returns a single character in the Macintosh character encoding set that most closely matches the specified Macintosh character. If the match can not be made exactly, this sets the error to
\pard\tx3620\fi-380\li3620\fc0 0 Result codes and test\
1 The returned Pointer\
2 The lenght of the returning data\
\pard\tx7140\b\li2100\fc0 \
\pard\tx3120\tx3620\tx4120\b0\li2620\fc0 This behaves as documented in the TextConverter class: it converts data from the source string to a destination string it creates, and it then returns this string with its length. See the description above, and the table below, for encoding details. \
\pard\tx7140\fs16\li2100 \
\b \
\fs28 init\
\pard\f1\b0\fi-1020\li3620 -
\f0 (Instance)
\b init\
\pard\tx3620\b0\fi-380\li3620 0 Result codes and test\
\pard\tx3120\tx3620\tx4120\b0\fs28\li2620 This allows the caller to specify whether future conversions should convert the NeXTstep characters ` and ' to equivalent
\i looking
\i0 Macintosh characters (above 128), or equivalent characters in the ASCII set (below 128). If set to YES, it converts to the upper. Otherwise, it converts to the lower. \
\fs16 \
\pard\tx7140\b\li2100 \
\b0 \
\fs28 BUGS AND PROBLEMS\
\fs16 \
\pard\tx3120\tx3620\tx4120\fs28\li2620 I'm not at all sure these are ideal implementations for two reasons: One could argue that a general class that reads a conversion table in would be nicer. Yet, then one must cart around a conversion table outside the class somewhere, and I don't like that very much, despite its general advantages. The other is that If one has a string of things to be converted, and would like to do it faster than one character converted per method call, but doesn't want the strings offered in the ConvertString method when an unknown character is found, one is stuck!\
\pard\tx3120\tx3620\tx4120\li2620 Characters from 0x00 to 0x79 are converted exactly as the superclass converts them, with the following exceptions (the second is to convert the line termination character)\
\pard\tx3120\tx3620\tx4120\b0\fs24\li2620 Characters above 0x79 are converted as detailed in the following columns. Note that an entry of `
\fc0 ——' means that the specified Mac character could not be converted. When this occurrs, the object returns the Mac character code, and sets an error value. If the strict Inside Mac V. 1 flag is set, then all characters above D8 are returned as themselves with no error (as shown in column 5). If one uses the ConvertString method, the object returns the values detailed in column 4. Note that these never return a value of `——', but instead return the name of the character it could not convert. (the values with `——' in the final column will get the strings showin the ConvertString column if this flag is set when calling that method)\